import os
import os.path
import shutil
import time
a = 1
path_str = "F:/Game/Snap/剑侠情缘II/"


def file_extension(path_str):
    return os.path.splitext(path_str)[1]


def circulate_copy():
    while a > 0:
        file_list = os.listdir(path_str)
        for file in file_list:
            if file_extension(file) == '.png':
                shutil.move(path_str + file, path_str + "img/" + file)
                print("move file to:" + path_str + "img/" + file)
            time.sleep(4)


if __name__ == '__main__':
    circulate_copy()

